Fix/ethernet things connections#670
Merged
Merged
Conversation
Contributor
ST-LIB Release Plan
Pending changes
|
FoniksFox
marked this pull request as draft
June 27, 2026 16:42
…l directive to work with a computer connexion)
FoniksFox
marked this pull request as ready for review
July 8, 2026 16:47
victor-Lopez25
approved these changes
Jul 8, 2026
victor-Lopez25
left a comment
Contributor
There was a problem hiding this comment.
This will certainly need further changes
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Ethernet/TCP diagnostics path to support forwarding diagnostic records over a specific TCP socket, adds support for variable-length TCP “orders” in the stream parser, and introduces throttling to reduce sink flooding.
Changes:
- Add an Ethernet diagnostics sink that targets a single
OrderProtocol*and aDiagnosticTransportOrderthat can parse inbound diagnostic orders and republish them viaDiagnostics::Hub. - Update
TcpOrderStreamParserandOrderto support a “variable-length” receive mode viaget_size() == 0plus areset_for_receive()hook. - Adjust TCP connection and lwIP timing/keepalive-related configuration to improve connection behavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
Src/HALAL/Services/Diagnostics/DiagnosticSinks.cpp |
Adds a transport order for diagnostics and an Ethernet sink install hook targeting a single socket. |
Src/HALAL/Services/Diagnostics/DiagnosticsHub.cpp |
Adds per-priority flush throttling (when STLIB_ETH is enabled). |
Src/HALAL/Services/Communication/Ethernet/LWIP/TCP/Socket.cpp |
Avoids panicking on initial tcp_connect() error; defers recovery via reset logic. |
LWIP/Target/lwipopts.h |
Tweaks lwIP timeout pool sizing and TCP timer intervals. |
Inc/HALAL/Services/Diagnostics/Diagnostics.hpp |
Adds flush throttle state and declares install_ethernet_sink(OrderProtocol*). |
Inc/HALAL/Services/Communication/Ethernet/LWIP/TCP/TcpOrderStreamParser.hpp |
Adds variable-length order handling and calls reset_for_receive() after consumption. |
Inc/HALAL/Services/Communication/Ethernet/LWIP/Ethernet.hpp |
Tightens default TCP keepalive macros. |
Inc/HALAL/Models/Packets/Order.hpp |
Adds the reset_for_receive() virtual hook. |
.changesets/ethernet-diagnostics-forwarding.md |
Adds a changeset describing the new behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Review copilot comments first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It is ugly, it is not great, but it works and we need it